package com.lyf.gateway.config;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;
import java.util.ArrayList;

@Data
@NoArgsConstructor
@Configuration
public class InnerConfig {

    @Autowired
    private GlobalConfig globalConfig;

    @Resource
    private RefusePathProperties refusePath;

    public ArrayList<String> getBaggageItemKey() {
        return globalConfig.getUrls();
    }

    public ArrayList<String> getRefusePaths() {
        return refusePath.getUrls();
    }
    public String getSwaggerSuffix(){
        return refusePath.getSwaggerSuffix();
    }
    private String prometheusEndPoint = "prometheus";
    private String docPrefix = "/doc.html";
    /**
     * 黑名单关键词
     * @return
     */
    public String getKeyWord(){
        return refusePath.getKeyWord();
    }
}
